package com.huatai.verity.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;

/**
 * @program: ht-system
 * @description: 授权对象实体
 * @author: songxiude
 * @create: 2023-07-21 15:25
 **/
@Data
@TableName("ht_auth_object")
@ApiModel(value = "授权对象实体",description = "授权对象实体")
public class AuthObject {

	@ApiModelProperty("主键id")
	private Long id;

	@ApiModelProperty(value = "授权对象",required = true)
	@NotBlank(message = "授权对象不能为空")
	private String authObject;

	@ApiModelProperty(value = "单位名称",required = true)
	@NotBlank(message = "单位名称不能为空")
	private String unitName;

	@ApiModelProperty("联系方式手机号")
	private String phoneNumber;

	@TableField(value = "create_time",fill = FieldFill.INSERT)
	@ApiModelProperty(value = "创建时间",hidden = true)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
	private LocalDateTime createTime;

	@TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
	@ApiModelProperty(value = "更新时间",hidden = true)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
	private LocalDateTime updateTime;
}
